<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.4.4.js"></script>
<script type="text/javascript">
	$(function() {
		$.getJSON("employee-manager!list", function(data) {
			var count = 1;
			var idArray=new Array();
			$.each(data.listEmp, function(i, emp) {
				$("#result").append(emp['name']);
				var trHTML='<tr>';
				trHTML+='<td>'+count+'</td>';
				trHTML+='<td>'+emp['job_no']+'</td>';
				trHTML+='<td>'+emp['name']+'</td>';
				trHTML+='<td>'+emp['gender']+'</td>';
				trHTML+='<td>'+emp['mobile']+'</td>';
				trHTML+='<td>'+emp['cert_number']+'</td>';
				trHTML+='<td>'+emp['email']+'</td>';
				trHTML+='<td>'+emp['top_education']+'</td>';
				trHTML+='<td>'+emp['status']+'</td>';
				trHTML+='<td>'+'<input type=button value="查看详情" class="getId" >'+'</td>';
				trHTML+='</tr>';
				idArray[count]=emp['id'];
				count+=1;
				$('#employeeResult').append(trHTML);
			});
		$('.getId').bind('click', function() {
			var id=idArray[this.parentNode.parentNode.rowIndex];
			document.location.replace('employee-info.html?id='+id);
		});
		});
	});
</script>
</head>
<body>
<table border="1" cellspacing="0" id="employeeResult">
	<tr>
		<th>NO</th>
		<th>工号</th>
		<th>姓名</th>
		<th>性别</th>
		<th>联系电话</th>
		<th>身份证</th>
		<th>电子邮件</th>
		<th>最高学历</th>
		<th>当前状态</th>
		<th>操作</th>
	</tr>
</table>
</body>
</html>